package com.zdf.license.web.controller;

import com.zdf.license.verify.service.LicenseVerifyService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@AllArgsConstructor
public class IndexController {

    private final LicenseVerifyService licenseVerifyService;

    /**
     * redirect
     */
    @GetMapping("/")
    public ModelAndView index(){
        ModelAndView modelAndView = new ModelAndView("index");
        modelAndView.addObject("licenseAuthInfo", licenseVerifyService.licenseAuthInfo());
        return modelAndView;
    }

}
